/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package USECASE;

import BO.Adresse;
import BO.Employe;
import BO.Intervention;
import BO.ListeIntervention;
import java.util.GregorianCalendar;

/**
 *
 * @author olivierm
 */
public class UC_GestionIntervention {

    /**
     * Constructeur du singleton
     */
    public static UC_GestionIntervention instance = new UC_GestionIntervention();
    
    public static UC_GestionIntervention getInstance(){
        return instance;
    }
    
    /**
     * Traitements
     */
    public Intervention ajouterIntervention(GregorianCalendar creation, GregorianCalendar intervention, int priorite, 
        InterventionStatus status, Intervention parentInt, Intervention enfantInt,Adresse adresse,Employe appelant){
        Intervention intervention = new Intervention(creation, intervention, priorité, appelant, status, parentInt, enfantInt, adresse);
        return intervention;//TO DO
    }
    
    public Intervention rechercherIntervention(Intervention intervention){
        if(intervention == null)return null;
        Intervention inter = ListeIntervention.getInstance().rechercherIntervention(intervention.get_numeros());
        return inter;
    }
    
    public Intervention modifierStatut(){
        return null;//TO DO
    }
}
